<template>
  <div class="main-content">
    <div style="height: 100px; padding-top: 30px;background-color: rgb(238, 238, 238)">
      <div style="width: 68%;display: flex;margin-left: auto;margin-right: 260px;">
        <div style="flex: 2;color: #6a6aa8; font-size: 30px; font-weight: bold;">公 告 栏</div>
        <div style="flex: 8;">
          <input type="text" style="width: 500px; height: 40px; border-radius: 10px; border-color: gray;font-size: 18px;">
          <button style="width: 80px; height: 40px; border-radius: 10px;margin-left: 10px; font-weight: bold; border-color: grey;font-size: 18px;">搜索</button>
        </div>

      </div>
    </div>

    <div style="display: flex;">
      <div class="left"></div>

      <div style="width: 68%; height: 100vh; background-color: #e1dfdf; border-radius: 10px;">
        <div style="margin: 30px 0;" v-for="item in typeData">
          <div style=" display: flex;">
            <div style="margin-left: 10px; font-size: 16px; width: 100px;">{{ item.noticename }}</div>
            <div style="margin-left: 10px; font-size: 16px;">{{ item.notice }}</div>
            <div style="margin-left: auto;margin-right: 20px; font-size: 16px;">{{ item.time }}</div>
          </div>
        </div>
      </div>

      <div class="right"></div>
    </div>
  </div>
</template>

<script>
import request from "@/utils/request";

export default {
  data() {
    return {
      typeData:[],
    }
  },
  created() {
    this.findByNotice()

  },
  methods:{
    findByNotice() {
      request.post("/notice/findByNotice").then(res => {
        if (res.code === '0'){
          this.typeData = res.data;
        } else {
          this.$message.error(res.msg);
        }
      })
    }
  }
}

</script>

<style>

.main-content {
  width: 100%;
  margin: 0 auto;
}

.left {
  width: 16%;
  height: 100vh;
  background-color: rgb(238, 238, 238);
}

.right {
  width: 16%;
  height: 100vh;
  background-color: rgb(238, 238, 238);
}

</style>
